﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchListHocVienTVTSAllWeb.ascx.cs"
    Inherits="admin_listHocVienTVTSAllWeb" %>
<%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
    <tr>
        <td style="background-color: White;" valign="top">
            <table cellspacing="0" cellpadding="0" width="100%">
                <tr>
                    <td colspan="6" align="left" class="HeadingTree">
                        Danh sách ứng viên
                    </td>
                </tr>
                <tr>
                    <td colspan="6" align="left">
                        <asp:ValidationSummary ID="vdsHocVien" CssClass="cssManField" runat="server" Font-Bold="True"
                            BorderWidth="0" />
                        <asp:Label ID="lblMess" CssClass="cssManField" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td align="center" valign="top" style="height: 670px;">
                        <table cellspacing="0" cellpadding="1" width="95%" border="0">
                            <tr>
                                <td align="center">
                                    <asp:Panel ID="pnTimKiem" runat="server" GroupingText="Thông tin tìm kiếm ">
                                        <table cellspacing="0" cellpadding="1" width="100%" border="0">
                                            <tr>
                                                <td align="right" style="width: 10%;">
                                                    <asp:Label ID="lblMaHocVien" CssClass="cssLabel" runat="server" Text="<U>M</U>ã ứng viên:" />
                                                </td>
                                                <td style="width: 30%;" align="left">
                                                    <asp:TextBox ID="txtMaHocVien" AccessKey="m" runat="server" MaxLength="20" Width="98%" />
                                                </td>
                                                <td style="width: 15%;" align="right">
                                                    <asp:Label ID="lblTenHocVien" CssClass="cssLabel" runat="server" Text="<U>T</U>ên học viên:" />
                                                </td>
                                                <td style="width: 30%;" align="left">
                                                    <asp:TextBox ID="txtTenHocVien" AccessKey="t" runat="server" MaxLength="256" Width="96%" />
                                                </td>
                                                <td align="left" style="width: 15%;">
                                                    <asp:Button ID="btnSearch" AccessKey="s" CssClass="cssButton" runat="server" Width="98px"
                                                        Text="Lọc(s)" OnClick="btnSearch_Click" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="lblDienThoai" CssClass="cssLabel" runat="server" Text="Đ<U>i</U>ện thoại" />
                                                </td>
                                                <td align="left">
                                                    <asp:TextBox ID="txtDienThoai" AccessKey="i" runat="server" MaxLength="20" Width="98%" />
                                                </td>
                                                <td align="right">
                                                    <asp:Label ID="lblEmail0" CssClass="cssLabel" runat="server" Text="<U>E</U>mail:" />
                                                </td>
                                                <td align="left">
                                                    <asp:TextBox ID="txtEmail" AccessKey="e" runat="server" MaxLength="256" Width="96%" />
                                                </td>
                                                <td align="left" style="width: 10%;">
                                                    <asp:Button ID="btnReset" AccessKey="r" CssClass="cssButton" runat="server" Width="98px"
                                                        Text="Xóa trắng(r)" OnClick="btnReset_Click" />
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Panel ID="pnTrangThaiGoi" runat="server" GroupingText="Trạng thái gọi" Visible="False">
                                        <asp:RadioButtonList ID="rblTrangThaiGoi" runat="server" RepeatColumns="5" CellPadding="0"
                                            CellSpacing="0" BorderWidth="0" AutoPostBack="True" OnSelectedIndexChanged="rblTrangThaiGoi_SelectedIndexChanged"
                                            Width="100%" Visible="False" />
                                    </asp:Panel>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Panel ID="pnTenTruong" runat="server" GroupingText="Trường chăm sóc" Visible="False">
                                        <asp:RadioButtonList ID="rblTenTruong" runat="server" RepeatColumns="5" CellPadding="0"
                                            CellSpacing="0" BorderWidth="0" AutoPostBack="True" OnSelectedIndexChanged="rblTenTruong_SelectedIndexChanged"
                                            Width="100%" />
                                    </asp:Panel>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
                                        <tr>
                                            <td align="left">
                                                &nbsp;
                                            </td>
                                            <td align="right">
                                                <asp:Button ID="btnInDanhSach" AccessKey="i" CssClass="cssButton" runat="server"
                                                    Width="98px" Text="In danh sách(i)" OnClick="btnInDanhSach_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="center">
                                    <asp:GridView ID="grvHocVien" runat="server" Width="100%" CellPadding="0" AutoGenerateColumns="False"
                                        AllowPaging="True" HeaderStyle-CssClass="cssGridHeader" EditRowStyle-CssClass="cssGridEdit"
                                        RowStyle-CssClass="cssGridCell" AlternatingRowStyle-CssClass="cssGridAlterCell"
                                        PagerStyle-CssClass="cssGridPager" SelectedRowStyle-CssClass="cssSelectedRow"
                                        EmptyDataText="Không có dữ liệu phù hợp"
                                        DataKeyNames="ID" PageSize="16" PagerStyle-HorizontalAlign="Center" OnRowDataBound="grvHocVien_RowDataBound"
                                        OnRowDeleting="grvHocVien_RowDeleting" OnPageIndexChanging="grvHocVien_PageIndexChanging"
                                        AllowSorting="True" OnSorting="grvHocVien_Sorting" EnableModelValidation="True">
                                        <EditRowStyle CssClass="cssGridEdit"></EditRowStyle>
                                        <HeaderStyle CssClass="cssGridHeader"></HeaderStyle>
                                        <PagerSettings Position="TopAndBottom" />
                                        <AlternatingRowStyle CssClass="cssGridAlterCell"></AlternatingRowStyle>
                                        <Columns>
                                            <asp:TemplateField Visible="False">
                                                <ItemTemplate>
                                                    <asp:Label ID="HocVienID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ID") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField Visible="False">
                                                <ItemTemplate>
                                                    <asp:Label ID="MaLink" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.MaLink") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="Seq" SortExpression="Seq" HeaderText="TT" ItemStyle-Width="8px"
                                                HeaderStyle-ForeColor="White" ItemStyle-HorizontalAlign="Center">
                                                <HeaderStyle ForeColor="White"></HeaderStyle>
                                                <ItemStyle HorizontalAlign="Center" Width="8px"></ItemStyle>
                                            </asp:BoundField>
                                            <asp:TemplateField HeaderText="Link Web" SortExpression="LinkWeb" ControlStyle-Font-Underline="false"  
                                                HeaderStyle-ForeColor="White" ItemStyle-HorizontalAlign="Left">
                                                <ControlStyle Font-Underline="False"></ControlStyle>
                                                <HeaderStyle ForeColor="White"></HeaderStyle>
					                            <ItemStyle Width="100px"/>
					                            <ItemTemplate><%# Eval("LinkWeb") %></ItemTemplate>						
					                        </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Mã ứng viên" SortExpression="MaHocVien" ControlStyle-Font-Underline="false"  HeaderStyle-ForeColor="White" ItemStyle-HorizontalAlign="Left">
                                                <ControlStyle Font-Underline="False"></ControlStyle>
                                                <HeaderStyle ForeColor="White"></HeaderStyle>
					                            <ItemStyle Width="100px"/>
					                            <ItemTemplate>
							                        <asp:Label id="lblMaHocVienGV" CssClass="cssGridLink" Target="_blank" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.MaHocVien") %>' />
						                        </ItemTemplate>						
					                        </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Họ tên" SortExpression="HoTen" ControlStyle-Font-Underline="false"
                                                HeaderStyle-ForeColor="White" ItemStyle-HorizontalAlign="Left" ControlStyle-Width="100px">
                                                <ControlStyle Font-Underline="False"></ControlStyle>
                                                <HeaderStyle ForeColor="White"></HeaderStyle>
                                                <ItemStyle Width="100px" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblHoTenGV" CssClass="cssLabel" Target="_blank" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.HoTen") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="DienThoai" SortExpression="DienThoai" HeaderText="Điện thoại"
                                                HeaderStyle-ForeColor="White" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Center">
                                                <HeaderStyle ForeColor="White"></HeaderStyle>
                                                <ItemStyle HorizontalAlign="Center" Width="80px"></ItemStyle>
                                            </asp:BoundField>
                                             <asp:BoundField DataField="DienThoai2" HeaderText="Điện thoại 2" ItemStyle-Width="120px"/>
                                             <asp:BoundField DataField="Email" SortExpression="Email" HeaderText="Email"
                                                HeaderStyle-ForeColor="White" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Center">
                                                <HeaderStyle ForeColor="White"></HeaderStyle>
                                                <ItemStyle HorizontalAlign="Center" Width="80px"></ItemStyle>
                                            </asp:BoundField>
                                              <asp:BoundField DataField="Email2" HeaderText="Email 2" />
                                              <asp:BoundField DataField="NgayGoi" SortExpression="ngayNhap" DataFormatString="{0:dd/MM/yyyy hh:mm}"
                                                HtmlEncode="false" HeaderText="Gọi gần nhất">
                                                <HeaderStyle ForeColor="White" />
                                                <ItemStyle Width="80px" />
                                            </asp:BoundField>
                                            <asp:TemplateField HeaderText="Level" SortExpression="Level" ControlStyle-Font-Underline="false"
                                                HeaderStyle-ForeColor="White" ItemStyle-HorizontalAlign="Center" ControlStyle-Width="15px">
                                                <ControlStyle Font-Underline="False"></ControlStyle>
                                                <HeaderStyle ForeColor="White"></HeaderStyle>
                                                <ItemStyle Width="15px" />
                                                <ItemTemplate>
                                                    <asp:Label ID="LevelID" CssClass="cssLabel" Target="_blank" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.LevelID") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Nội dung" ControlStyle-Font-Underline="false" ItemStyle-Width="150px"
                                                HeaderStyle-ForeColor="White" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblNoidungGV" CssClass="cssLabel" runat="server" Width="150px" />
                                                </ItemTemplate>
                                                <ControlStyle Font-Underline="False"></ControlStyle>
                                                <HeaderStyle ForeColor="White"></HeaderStyle>
                                                <ItemStyle HorizontalAlign="Center" Width="150px"></ItemStyle>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="NgayGoi" SortExpression="NgayGoi" HtmlEncode="false" DataFormatString="{0:dd/MM/yyy hh:mm}"
                                                HeaderText="Gọi gần nhất">
                                                <HeaderStyle ForeColor="White" />
                                                <ItemStyle Width="80px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="TenTrangThaiGoi" SortExpression="TenTrangThaiGoi" HeaderStyle-ForeColor="White"
                                                HeaderText="Trạng thái " ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center">
                                                <HeaderStyle ForeColor="White"></HeaderStyle>
                                                <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
                                            </asp:BoundField>
                                            <asp:BoundField DataField="GhiChuNguon" HeaderText="Tư vấn tuyển sinh">
                                                <HeaderStyle ForeColor="White" />
                                                <ItemStyle Width="90px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="NgayNhap" SortExpression="ngayNhap" DataFormatString="{0:dd/MM/yyyy hh:mm}"
                                                HtmlEncode="false" HeaderText="Thời gian nhập">
                                                <HeaderStyle ForeColor="White" />
                                                <ItemStyle Width="80px" />
                                            </asp:BoundField>
                                            <asp:TemplateField HeaderText="Tên Trường" SortExpression="TenTruong" ControlStyle-Font-Underline="false"
                                                ItemStyle-Width="20px" HeaderStyle-ForeColor="White" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblTenTruong" CssClass="cssLabel" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.TenTruong")  %>' /></ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Tên Trường" SortExpression="TenTruong" ControlStyle-Font-Underline="false"
                                                ItemStyle-Width="20px" HeaderStyle-ForeColor="White" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
													<%# Convert.ToInt32(Eval("Import_YN"))==1?"Phân contact":"TVTS nhập"%>
												</ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Chức năng" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="50px">
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="hplAddGV" CssClass="cssHyperLinkIcon" Target="_blank" runat="server"
                                                        ImageUrl="~/images/Button/Insert.gif" ToolTip="Thêm sự kiện" />
                                                    <% if (Session["QuyenId"] != null && Convert.ToInt32(Session["QuyenId"]) != 26)
                                                       { %>
                                                        <asp:HyperLink ID="hplUpdateGV" CssClass="cssHyperLinkIcon" Target="_blank" runat="server"
                                                           ImageUrl="~/images/Button/Edit.gif" ToolTip="Sửa bản ghi" />
                                                    <% } %>
                                                    <% 
                                                        if (is_having_quyen_xoa_contact())
                                                        {
                                                    %>
                                                    <asp:ImageButton ID="btnDelete" AccessKey="d" runat="server" ImageUrl="~/images/Button/Delete.gif"
                                                        ToolTip="Xóa bản ghi" CommandName="delete" />
                                                    <%  } %>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <ItemStyle HorizontalAlign="Center" Width="50px"></ItemStyle>
                                            </asp:TemplateField>
                                            
                                        </Columns>
                                        <PagerStyle HorizontalAlign="Center" CssClass="cssGridPager"></PagerStyle>
                                        <RowStyle CssClass="cssGridCell"></RowStyle>
                                        <SelectedRowStyle CssClass="cssSelectedRow"></SelectedRowStyle>
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
